package com.jiayou.im.entity

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.baomidou.mybatisplus.extension.activerecord.Model
import com.fasterxml.jackson.annotation.JsonFormat
import java.io.Serializable
import java.time.LocalDateTime

/**
@author 李 双
@data   2020-11-20  11:34
@info
 */
@TableName("im_chat")
data class Chat(
    @TableId("id", type = IdType.AUTO)
    var id: Int? = null,
    /**
     * 用户1
     */
    var id1: String? = null,

    /**
     * 用户2
     */
    var id2: String? = null,

    /**
     * 消息
     */
    var text: String? = null,

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    var createTime: LocalDateTime? = null


) : Model<Chat>(), Serializable {
    companion object {
        private const val serialVersionUID = 1L
    }
}
